package org.hank.demoproject.test

import android.os.Bundle
import android.widget.TextView
import androidx.appcompat.app.AppCompatActivity
import androidx.lifecycle.MutableLiveData
import com.orhanobut.logger.Logger
import org.hank.demoproject.R
import org.hank.demoproject.utils.Click

class TestActivity : AppCompatActivity() {
    var testLiveObs :MutableLiveData<Boolean> = MutableLiveData()

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_test)
        testLiveObs.postValue(true)
        testLiveObs.observe(this@TestActivity){
            Logger.d("get live data value = ${testLiveObs.value}")
        }
//        testLiveObs.postValue(false)
        findViewById<TextView>(R.id.text_test_main).Click{
            Logger.d("click too view")
        }
    }


}